package com.jxc.dao;

import java.io.InputStream;
import java.math.BigInteger;
import java.util.List;

import org.hibernate.Query;

import com.jxc.entity.TbEmployee;

public interface CommonUtilDao {

	/**
	 * 
	 * funtion:分页查询 
	 * 说明setFirstResult()，从0开始    setMaxResults,每页显示多少条数据 
	 * @param HQL
	 * @return
	 */
	//@Transactional(propagation=Propagation.NOT_SUPPORTED,readOnly=true)
	public abstract List QueryList(String HQL, Integer first, Integer max);

	/**
	 * 
	 * funtion:查询 一条sql语句
	 * @param HQL
	 * @return
	 */
	public abstract List QueryList(String HQL);

	/**
	 * 
	 * funtion:查询记录数
	 * @param HQL
	 * @return
	 */
	public abstract Integer QuerySize(String HQL);
	
	
	public abstract Integer QueryNativeSize(String HQL);
	
	public abstract List QueryNativeList(String HQL);
	
	
	public abstract List QueryNativeList(String HQL, Integer first, Integer max);
	
	public List QueryNativeListEntity(String entity,String HQL, Integer first, Integer max);

	//更新用的sql
	public int Update_Native(TbEmployee e);
	
	public String QueryNativeFile(String HQL);
	public String QueryFile(String HQL);
	public String[]  select(String sql);
	
	
	public InputStream QueryFileInputStream(String HQL);
	public InputStream QueryFileInputStreamNative(String HQL);
	
	//分页——根据工单创建人公司地市名查找工单详细信息
	public List findtask_bycityname(String cityname,int start, int limit,String startime,String endtime);
	//总数——根据工单创建人公司地市名查找工单详细信息
	public int findtask_bycityname_totalRecord(String cityname,String startime,String endtime);
	//分页——根据故障型号、故障类型类型查找故障现象
	public List findfault_bycityname(String type,String model,int start, int limit,String startime,String endtime);
	//总数——根据故障型号、故障类型类型查找故障现象
	public int findfault_bycityname_totalRecord(String type,String model,String startime,String endtime);
	
	public int GetId(String SQL);
	public Integer GetCount(String SQL);
}